package com.example.common.valid.annotation;

import com.example.common.valid.validator.ListValueConstrainValidator;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * <p>
 *
 * </p>
 *
 * @author zyred
 * @since v 0.1
 **/
@Target(ElementType.FIELD)
@Retention(RetentionPolicy.RUNTIME)
// 开启注入
@Constraint(validatedBy = {ListValueConstrainValidator.class})
public @interface ListValue {

    String message() default "{com.example.common.valid.annotation.ListValue.message}";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};

    int [] vals();
}
